<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    function Fn(n, a, s){
        this.name = n;
        this.age = a;
        this.sex = s;
    }

    function createMan(n, a){
        return new Fn(n, a, "男");
    }

    function create18Man(n){
        return new createMan(n, 18);
    }

    const m1 = new createMan("admin", 18);
    const m2 = new createMan("张三", 20);
    const m3 = new createMan("李四", 19);

    console.log(m1)
    console.log(m2)
    console.log(m3)
    
    console.log(m3 === m1)
    console.log(m3 === m2)
    console.log(m1 === m2)

    const a = new create18Man("张二");
    const b = new create18Man("李三");
    const c = new create18Man("王一");

    console.log(a)
    console.log(b)
    console.log(c)
    console.log(c === a)
    console.log(c === b)
    console.log(a === b)




    

</script>
</html>